package com.ktjy.web.servlet;

import com.ktjy.web.entity.AjaxResult;
import com.ktjy.web.entity.Menu;
import com.ktjy.web.entity.Role;
import com.ktjy.web.service.MenuService;
import com.ktjy.web.service.impl.MenuServiceImpl;
import com.ktjy.web.util.BaseSevlet;
import my.framework.anno.RequestMapping;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

//@WebServlet(name = "MenuServlet", value = "/api/MenuServlet")
public class MenuServlet extends BaseSevlet {

    MenuService menuService=new MenuServiceImpl();
    @RequestMapping("/selMenu")
    public Object selMenu(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        List<Menu> list=menuService.selMenuAll();
        return AjaxResult.success("查询成功",list);
    }
}
